<?php
/* @var $breadcrumb string */
/* @var $steps array */
use frontend\modules\yii2\widgets\layouts\markdown\Markdown;
$sidebar = "";
$content = "";
$readCount = \common\models\Redis::getReadCount();
foreach($steps as $key => $step){
    $num = $key + 1;
    $sidebar .= <<<HTML
        <div class="step s-active">
            <span class="s-num">$num</span>
            <span class="s-text">{$step['label']}</span>
        </div>
HTML;
    $title = $key == 0 ? "<h1>$breadcrumb</h1>" : "";
    $step = Markdown::widget(["content"  => $step["content"]]);
    $content .= <<<HTML1
        <div class="s-content" aria-level="step{$num}">
            {$title}
            <div class="s-body">
            {$step}
            </div>
        </div>
HTML1;
}

echo <<<HTML
<ol class="breadcrumb s-breadcrumb" style="">
    <li><a href="/" class="glyphicon glyphicon-home"></a></li>
    <li><a href="/codelab">Codelab</a></li>
    <li><a href="#">{$breadcrumb}</a></li>
</ol>
<div class="container-fluid">
    <div class="row">
        <div class="col-lg-2 col-md-3 col-sm-3 hidden-xs">
            <div class="s-sidebar">
                {$sidebar}
            </div>
        </div>
        <div class="col-lg-10 col-md-9 col-sm-9">
            <article>
                <div>
                    {$content}
                </div>
                <button class="btn btn-default back">返回</button>
                <button class="btn btn-primary next">下一步</button>
                
               
            </article>
            <div class="read-count">
                <span class="glyphicon glyphicon-eye-open"></span>
                <span>{$readCount}</span>
            </div>
            <footer class="footer vertical-container">
                <p><span>浙ICP备2021007911号</span>Powered by @Lvzmen</p>
            </footer>
        </div>
    </div>
</div>
HTML;